package com.lt.schoolchat.common;

import lombok.Getter;

/**
 * 错误码
 *
 * @author teng
 */
@Getter
public enum ErrorCode {
    SUCCESS(0, "ok"),
    PARAMS_ERROR(40000, "请求参数错误"),
    NOT_LOGIN_ERROR(40100, "未登录"),
    NO_AUTH_ERROR(40101, "无权限"),
    NOT_FOUND_ERROR(40400, "请求数据不存在"),
    FORBIDDEN_ERROR(40300, "禁止访问"),
    SYSTEM_ERROR(50000, "系统内部异常"),
    OPERATION_ERROR(50001, "操作失败"),
    NOT_FOCUS_ME(51000, "用户无法关注自己"),
    NOT_FOLLOW_AGAIN(51001, "你已关注，无法再次关注"),
    NOT_CANCEL_FOLLOW(51002, "你尚未关注，无法取消关注"),
    NOT_USE_ILLEGAL_WORDS(51003, "禁止使用违规用词"),
    NOT_LIKE_AGAIN(51004, "你已点赞，无法再次点赞"),
    NOT_CANCEL_LIKE(51005,"你尚未点赞，无法取消点赞");

    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
